package com.inputabc.ct.v1.ui.keysetting.component;

import com.inputabc.EzGUIFramework.util.alias.Ez;
import com.inputabc.ct.v1.context.Components;
import com.inputabc.ct.v1.context.ComponentsBuilder;
import com.inputabc.ct.v1.context.ContextParams;
import com.inputabc.ct.v1.ui.TextBox;

import javax.swing.*;
import java.awt.*;

public class KeySettingFrame extends JFrame {
    private KeySettingMainPanel keySettingMainPanel;
    private Components textBoxComponents = ComponentsBuilder.getComponentsContext().get(TextBox.class);

    {
        setName(this.getClass().getName());
        keySettingMainPanel = new KeySettingMainPanel();
    }

    public KeySettingFrame() {
        super("设置API密钥");
        setContentPane(keySettingMainPanel);

        Ez.removeButtonDottedLine(this);
        setAlwaysOnTop(true);
        setResizable(false);
        setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
        setIconImage( new ImageIcon(Toolkit.getDefaultToolkit()
                .getImage(ContextParams.class.getResource("/icon/title.png"))).getImage());
    }

    public KeySettingMainPanel getKeySettingMainPanel() {
        return keySettingMainPanel;
    }

    public void setKeySettingMainPanel(KeySettingMainPanel keySettingMainPanel) {
        this.keySettingMainPanel = keySettingMainPanel;
    }
}
